home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / qwatch / qwatch.frm < prev    next >
Text File  |  1995-05-08  |  15KB  |  434 lines

  1. VERSION 2.00
  2. Begin Form QWatch 
  3.    BackColor       =   &H00FFFFFF&
  4.    Caption         =   "Queue Watch"
  5.    ClientHeight    =   3525
  6.    ClientLeft      =   1470
  7.    ClientTop       =   1785
  8.    ClientWidth     =   4770
  9.    ForeColor       =   &H00FF8080&
  10.    Height          =   4215
  11.    Icon            =   QWATCH.FRX:0000
  12.    Left            =   1410
  13.    LinkMode        =   1  'Source
  14.    LinkTopic       =   "Form1"
  15.    ScaleHeight     =   3525
  16.    ScaleWidth      =   4770
  17.    Top             =   1155
  18.    Width           =   4890
  19.    Begin Timer WakeUp 
  20.       Left            =   4320
  21.       Top             =   3000
  22.    End
  23.    Begin PictureBox AppIcon 
  24.       Height          =   495
  25.       Left            =   2985
  26.       Picture         =   QWATCH.FRX:0302
  27.       ScaleHeight     =   465
  28.       ScaleWidth      =   465
  29.       TabIndex        =   14
  30.       TabStop         =   0   'False
  31.       Top             =   3000
  32.       Visible         =   0   'False
  33.       Width           =   495
  34.    End
  35.    Begin PictureBox Watch 
  36.       Height          =   495
  37.       Left            =   3600
  38.       Picture         =   QWATCH.FRX:0604
  39.       ScaleHeight     =   465
  40.       ScaleWidth      =   465
  41.       TabIndex        =   4
  42.       Top             =   2280
  43.       Width           =   495
  44.    End
  45.    Begin PictureBox Queue 
  46.       Height          =   495
  47.       Left            =   3600
  48.       Picture         =   QWATCH.FRX:0906
  49.       ScaleHeight     =   465
  50.       ScaleWidth      =   465
  51.       TabIndex        =   3
  52.       Top             =   1200
  53.       Width           =   495
  54.    End
  55.    Begin Frame Frame1 
  56.       BackColor       =   &H00FFFFFF&
  57.       Caption         =   "Warning Levels"
  58.       FontBold        =   -1  'True
  59.       FontItalic      =   0   'False
  60.       FontName        =   "MS Sans Serif"
  61.       FontSize        =   9.75
  62.       FontStrikethru  =   0   'False
  63.       FontUnderline   =   0   'False
  64.       ForeColor       =   &H00FF0000&
  65.       Height          =   2655
  66.       Left            =   360
  67.       TabIndex        =   7
  68.       Top             =   720
  69.       Width           =   2535
  70.       Begin TextBox RedLevel 
  71.          FontBold        =   -1  'True
  72.          FontItalic      =   0   'False
  73.          FontName        =   "MS Sans Serif"
  74.          FontSize        =   9.75
  75.          FontStrikethru  =   0   'False
  76.          FontUnderline   =   0   'False
  77.          Height          =   375
  78.          Left            =   1080
  79.          TabIndex        =   2
  80.          Text            =   "30"
  81.          Top             =   1920
  82.          Width           =   495
  83.       End
  84.       Begin PictureBox Red 
  85.          Height          =   495
  86.          Left            =   360
  87.          Picture         =   QWATCH.FRX:0C08
  88.          ScaleHeight     =   465
  89.          ScaleWidth      =   465
  90.          TabIndex        =   10
  91.          TabStop         =   0   'False
  92.          Top             =   1920
  93.          Width           =   495
  94.       End
  95.       Begin TextBox YellowLevel 
  96.          FontBold        =   -1  'True
  97.          FontItalic      =   0   'False
  98.          FontName        =   "MS Sans Serif"
  99.          FontSize        =   9.75
  100.          FontStrikethru  =   0   'False
  101.          FontUnderline   =   0   'False
  102.          ForeColor       =   &H00C00000&
  103.          Height          =   375
  104.          Left            =   1080
  105.          TabIndex        =   1
  106.          Text            =   "15"
  107.          Top             =   1200
  108.          Width           =   495
  109.       End
  110.       Begin PictureBox Yellow 
  111.          Height          =   495
  112.          Left            =   360
  113.          Picture         =   QWATCH.FRX:0F0A
  114.          ScaleHeight     =   465
  115.          ScaleWidth      =   465
  116.          TabIndex        =   9
  117.          TabStop         =   0   'False
  118.          Top             =   1200
  119.          Width           =   495
  120.       End
  121.       Begin PictureBox Green 
  122.          Height          =   495
  123.          Left            =   360
  124.          Picture         =   QWATCH.FRX:120C
  125.          ScaleHeight     =   465
  126.          ScaleWidth      =   465
  127.          TabIndex        =   8
  128.          TabStop         =   0   'False
  129.          Top             =   480
  130.          Width           =   495
  131.       End
  132.       Begin Label Label5 
  133.          Caption         =   "Jobs"
  134.          FontBold        =   -1  'True
  135.          FontItalic      =   0   'False
  136.          FontName        =   "MS Sans Serif"
  137.          FontSize        =   9.75
  138.          FontStrikethru  =   0   'False
  139.          FontUnderline   =   0   'False
  140.          Height          =   255
  141.          Left            =   1680
  142.          TabIndex        =   13
  143.          Top             =   1920
  144.          Width           =   495
  145.       End
  146.       Begin Label Label4 
  147.          Caption         =   "Jobs"
  148.          FontBold        =   -1  'True
  149.          FontItalic      =   0   'False
  150.          FontName        =   "MS Sans Serif"
  151.          FontSize        =   9.75
  152.          FontStrikethru  =   0   'False
  153.          FontUnderline   =   0   'False
  154.          Height          =   255
  155.          Left            =   1680
  156.          TabIndex        =   12
  157.          Top             =   1200
  158.          Width           =   495
  159.       End
  160.       Begin Label Label2 
  161.          BackColor       =   &H00FFFFFF&
  162.          Caption         =   "0        Jobs"
  163.          FontBold        =   -1  'True
  164.          FontItalic      =   0   'False
  165.          FontName        =   "MS Sans Serif"
  166.          FontSize        =   9.75
  167.          FontStrikethru  =   0   'False
  168.          FontUnderline   =   0   'False
  169.          ForeColor       =   &H00FF0000&
  170.          Height          =   255
  171.          Left            =   1080
  172.          TabIndex        =   11
  173.          Top             =   480
  174.          Width           =   1335
  175.       End
  176.    End
  177.    Begin ComboBox Server 
  178.       Height          =   300
  179.       Left            =   1200
  180.       Style           =   2  'Dropdown List
  181.       TabIndex        =   0
  182.       Top             =   240
  183.       Width           =   3255
  184.    End
  185.    Begin Label Label1 
  186.       BackColor       =   &H00FF0000&
  187.       Caption         =   "Watch"
  188.       ForeColor       =   &H00FFFFFF&
  189.       Height          =   210
  190.       Left            =   3570
  191.       TabIndex        =   5
  192.       Top             =   2775
  193.       Width           =   570
  194.    End
  195.    Begin Label Label6 
  196.       BackColor       =   &H00FF0000&
  197.       Caption         =   "Queues"
  198.       ForeColor       =   &H00FFFFFF&
  199.       Height          =   210
  200.       Left            =   3510
  201.       TabIndex        =   15
  202.       Top             =   1695
  203.       Width           =   705
  204.    End
  205.    Begin Label Label3 
  206.       BackColor       =   &H00FF0000&
  207.       Caption         =   "&Server"
  208.       FontBold        =   -1  'True
  209.       FontItalic      =   0   'False
  210.       FontName        =   "MS Sans Serif"
  211.       FontSize        =   9.75
  212.       FontStrikethru  =   0   'False
  213.       FontUnderline   =   0   'False
  214.       ForeColor       =   &H00FFFFFF&
  215.       Height          =   255
  216.       Left            =   360
  217.       TabIndex        =   6
  218.       Top             =   240
  219.       Width           =   735
  220.    End
  221.    Begin Menu mFile 
  222.       Caption         =   "&File"
  223.       Index           =   1
  224.       Begin Menu mExit 
  225.          Caption         =   "E&xit"
  226.          Index           =   2
  227.       End
  228.       Begin Menu mSeperator2 
  229.          Caption         =   "-"
  230.       End
  231.       Begin Menu mAbout 
  232.          Caption         =   "&About..."
  233.       End
  234.    End
  235. End
  236. Sub Form_Load ()
  237.     Dim szServers As String * 160
  238.     Dim nEntries As Integer, nTotal As Integer
  239.     Dim nResult As Integer, nIndex As Integer, nParse As Integer
  240.  
  241.     '*--------------------------------*
  242.     'query network for list of servers
  243.     '*--------------------------------*
  244.     nResult = NetServerEnum2("", 0, szServers, 160, nEntries, nTotal, &HFFFFFFFF, "")
  245.  
  246.     '*---------------------------------*
  247.     'parse results returned in szServers
  248.     '*---------------------------------*
  249.     nIndex = 0: nParse = 1
  250.     While nIndex < nEntries
  251.         nStart = nParse
  252.  
  253.         '*-------------------------------*
  254.         '